<script>
import base from '../process/index'
import $ from '@/common'
export default {
    extends: base,
    data() {
        return {
            deletePath: '/service/{app}/bill/data/{bill_code}',
            actionProto: {
                name: '删除',
                icon: 'trash-a',
                scope: 'rows'
            },
            submitMethod: 'DELETE'
        }
    },
    methods: {
        submitPath() {
            if (this.$owner.model && this.$owner.model.bill_code) {
                return $.composePath(this.deletePath, {
                    bill_code: this.$owner.model.bill_code
                })
            } else {
                return this.model.path
            }
        }
    }
}
</script>
